#!/bin/bash
purge_packages || exit 1

rm -f ~/.local/share/applications/cura.desktop
rm -f ~/Cura-mb-master-armhf-20200902.AppImage
rm -rf ~/.cache/cura
sudo rm -f /opt/Cura.AppImage /usr/share/applications/cura.desktop

#remove mime association
sed -i '/model\/stl=cura\.desktop;/d' ~/.config/mimeapps.list

#remove the libxcb-util.so.0 symlink, only if it's a symlink
if [ -h /usr/lib/arm-linux-gnueabihf/libxcb-util.so.0 ];then
  sudo rm /usr/lib/arm-linux-gnueabihf/libxcb-util.so.0
fi
